#include <iostream>

#include <deque>

using std::cout;
using std::endl;

int main()
{
	std::deque<int> d{ 1,4,5,6,6 };
	d.push_front(0);
	d.push_back(9);
	for each (const auto& v in d)
	{
		cout << v << "  ";
	}
	cout << endl;

	d.resize(4);
	for each (const auto& v in d)
	{
		cout << v << "  ";
	}
	cout << endl;

	d.shrink_to_fit();

	return 0;
}